.textIn_table {
  .ant-table-thead > tr > th,
  .ant-table-tbody > tr > td,
  .ant-table tfoot > tr > th,
  .ant-table tfoot > tr > td {
    padding: 10px 20px;
    line-height: 20px;
  }
}

.tableList {
  padding: 0 30px;

  :global {
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table tfoot > tr > th,
    .ant-table tfoot > tr > td {
      padding: 12px;
      line-height: 20px;
    }

    .ant-pagination {
      display: none;
    }

    .ant-table {
      &-body {
        overflow-y: auto !important;
      }

      &-thead {
        & > tr > th {
          padding: 17px 12px;
          color: @text-color;
          font-weight: bold;
          background: #f7f7fb;
          border-bottom: none;

          &::before {
            display: none;
          }
        }

        .ant-table-column {
          &-sorters {
            padding: 0px;
          }

          &-sorter-inner {
            color: #868a9c;
          }
        }
      }

      &-tbody {
        & tr:last-of-type {
          td {
            border-bottom: none;

            // a {
            //   &:hover {
            //     text-decoration: underline;
            //   }
            // }
          }
        }

        & tr:hover > td,
        .expandRowWrap > td {
          background: #f7f7fb;
        }

        td.ant-table-cell {
          a.disable-link {
            color: #868a9c;
          }
        }

        .ant-table-expanded-row {
          & > td {
            padding: 0;
            background: #f7f7fb;
          }

          // 1.17

          .ant-table {
            color: rgba(134, 138, 156, 0.68);

            &-thead > tr > th {
              color: rgba(58, 65, 92, 0.68);
            }

            &-thead > tr > th,
            &-tbody > tr > td {
              background: #f7f7fb;

              &:first-child {
                padding-left: 12px;
              }
            }

            &-tbody {
              & tr:hover > td {
                color: rgba(134, 138, 156, 1);
              }

              & .ant-table-row {
                td.ant-table-cell:first-child {
                  padding-left: 10px;
                }
              }
            }
          }
        }

        .ant-table-row-expand-icon {
          color: #868a9c;
          border: 1px solid #cacad4;
          border-radius: 2px;
          &:focus,
          &:hover {
            color: @primary-color;
            border-color: @primary-color;
          }
        }

        .expandWrap {
          background-color: red;
        }
      }
    }
  }
}

.editTable {
  :global {
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table tfoot > tr > th,
    .ant-table tfoot > tr > td {
      padding: 17px 12px !important;
    }

    .ant-table-tbody {
      .editable-row {
        .ant-table-cell {
          .ant-form-item {
            color: red !important;

            .ant-form-item-control > .ant-form-item-control-input {
              .ant-form-item-control-input-content {
                .ant-input-affix-wrapper {
                  min-height: 32px !important;
                  padding: 0 !important;
                }
              }
            }
          }

          input {
            width: 100% !important;
          }

          .ant-input-number {
            width: 100% !important;
          }

          .ant-input-number-input {
            width: 100% !important;
          }
        }

        .editable-cell-value-wrap {
          min-height: 32px;
          padding: 5px 16px;
          border: 1px solid #cacad4;
          border-radius: 2px;
          cursor: pointer;
        }
      }
    }
  }
}

.miniTableList {
  padding: 0 30px;

  :global {
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table tfoot > tr > th,
    .ant-table tfoot > tr > td {
      padding: 12px;
      line-height: 20px;
    }

    .ant-pagination {
      display: none;
    }

    .ant-table {
      &-body {
        overflow-y: auto !important;
      }

      &-thead {
        & > tr > th {
          padding: 10px 12px;
          color: @text-color;
          font-weight: bold;
          background: #f7f7fb;
          border-bottom: none;

          &::before {
            display: none;
          }
        }

        .ant-table-column {
          &-sorters {
            padding: 0px;
          }

          &-sorter-inner {
            color: #868a9c;
          }
        }
      }

      &-tbody {
        & tr {
          td {
            padding: 8px 12px;

            a {
              &:hover {
                text-decoration: underline;
              }
            }
          }
        }

        & tr:last-of-type {
          td {
            border-bottom: none;
            // padding: 10px;
          }
        }

        & tr:hover > td,
        .expandRowWrap > td {
          background: #f7f7fb;
        }

        .ant-table-expanded-row {
          & > td {
            padding: 0;
            background: #f7f7fb;
          }

          .ant-table {
            color: rgba(134, 138, 156, 0.68);

            &-thead > tr > th {
              color: rgba(58, 65, 92, 0.68);
            }

            &-thead > tr > th,
            &-tbody > tr > td {
              background: #f7f7fb;

              &:first-child {
                padding-left: 12px;
              }
            }

            &-tbody {
              & tr:hover > td {
                color: rgba(134, 138, 156, 1);
              }

              & .ant-table-row {
                td.ant-table-cell:first-child {
                  padding-left: 10px;
                }
              }
            }
          }
        }

        .ant-table-row-expand-icon {
          color: #868a9c;
          border: 1px solid #cacad4;
          border-radius: 2px;

          &:focus,
          &:hover {
            color: @primary-color;
            border-color: @primary-color;
          }
        }

        .ant-table-row-expand-icon-cell {
          box-sizing: border-box;
          width: 80px;
        }

        .expandWrap {
          background-color: red;
        }
      }
    }
  }
}

.no-padding {
  padding: 0;
}

.inlineTable {
  padding: 0 30px;

  :global {
    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .ant-table tfoot > tr > th,
    .ant-table tfoot > tr > td {
      padding: 12px;
      line-height: 20px;
    }

    .ant-pagination {
      display: none;
    }

    .ant-table {
      &-body {
        overflow-y: auto !important;
      }

      &-thead {
        & > tr > th {
          padding: 7px 12px;
          color: @text-color;
          font-weight: bold;
          line-height: 16px;
          background: #f7f7fb;
          border-bottom: none;
          border-bottom: 1px solid#E4E4EB;

          &::before {
            display: none;
          }
        }

        .ant-table-column {
          &-sorters {
            padding: 0px;
          }

          &-sorter-inner {
            color: #868a9c;
          }
        }
      }

      &-tbody {
        & > tr {
          td {
            padding: 7px 12px;
            line-height: 16px;
            border-bottom: 1px solid#E4E4EB !important;

            a {
              &:hover {
                text-decoration: underline;
              }
            }
          }
        }

        & > tr:last-child {
          td {
            border: none !important;
          }
        }

        & tr:hover > td,
        .expandRowWrap > td {
          background: #f7f7fb;
        }

        td.ant-table-cell {
          a.disable-link {
            color: #868a9c;
          }
        }

        // 可展开内容表格

        .ant-table-expanded-row {
          & > td {
            padding: 0;
            background: #f7f7fb;
          }

          .ant-table {
            color: rgba(134, 138, 156, 0.68);

            &-thead > tr > th {
              color: rgba(58, 65, 92, 0.68);
            }

            &-thead > tr > th,
            &-tbody > tr > td {
              background: #f7f7fb;

              &:first-child {
                padding-left: 12px;
              }
            }

            &-tbody {
              & tr:hover > td {
                color: rgba(134, 138, 156, 1);
              }

              & .ant-table-row {
                td.ant-table-cell:first-child {
                  padding-left: 10px;
                }
              }
            }
          }
        }

        .ant-table-row-expand-icon {
          color: #868a9c;
          border: 1px solid #cacad4;
          border-radius: 2px;

          &:focus,
          &:hover {
            color: @primary-color;
            border-color: @primary-color;
          }
        }

        .expandWrap {
          background-color: red;
        }
      }
    }
  }
}
.ant-modal-root {
  .ant-modal-content {
    .paginationWrap {
      padding: 20px 30px !important;
    }
  }
}
.paginationWrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: space-between;
  justify-items: center;
  padding: 30px;
  background-color: #fff;

  .total {
    color: @text-color;
    font-size: 14px;
    line-height: 32px;
  }

  .ant-pagination-options-size-changer.ant-select {
    width: 144px;
    // margin: 0;
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    padding: 0 16px;
  }

  .ant-select-item {
    color: rgba(@text-color, 0.68);
  }

  :global {
    .ant-select-item-option-disabled {
      cursor: not-allowed;

      &:hover {
        border: #868a9c;
      }

      &::selection {
        border: #868a9c;
      }

      button {
        cursor: not-allowed;
      }
    }
  }

  .ant-select-item-option-selected:not(.ant-select-item-option-disabled),
  .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    color: rgba(@text-color, 1);
    background-color: #f7f7fb;
  }
}

.tableList,
.miniTableList {
  .ant-card > .ant-card-body {
    padding: 0;
  }

  .ant-table-wrapper {
    // border-bottom: 1px solid #f0f0f0;

    .ant-table {
      .ant-table-thead {
        .ant-table-cell {
          &::before {
            display: none;
          }
        }
      }

      .ant-table-tbody {
        .ant-table-cell {
          .ant-input-number {
            width: 100%;
          }

          input,
          input[type='text'],
          input[type='number'] {
            width: 100%;
          }
        }
      }
    }
  }

  // 带有border的表格
  :global {
    .ant-table-bordered {
      .ant-table-container {
        border: 1px solid #e4e4eb !important;
        border-right: none !important;
        border-bottom: none !important;
        table {
          .ant-table-thead {
            tr > th {
              border-right: 1px solid #e4e4eb !important;
              border-bottom: 1px solid #e4e4eb !important;
            }
          }
          .ant-table-tbody {
            tr > td {
              border-right: 1px solid #e4e4eb !important;
              border-bottom: 1px solid #e4e4eb !important;
            }
          }
        }
      }
    }
  }
}
:global {
  .ant-table-tbody > tr.ant-table-row:hover > td {
    background: #f2f5fa !important;
  }
}
